#include "stdafx.h"

#include <string>
#include <iostream>
using namespace std;

class ElementOne
{
public:

	ElementOne()
	{
		cout << "ElementOne--Constructor" << endl;
	}
	~ElementOne()
	{
		cout << "ElementOne--Destructor" << endl;
	}
};

class ElementTwo
{
public:

	ElementTwo()
	{
		cout << "ElementTwo--Constructor" << endl;
	}
	~ElementTwo()
	{
		cout << "ElementTwo--Destructor" << endl;
	}
};

class Container
{
public:

	Container()
	{
		cout << "Container--NoPara Constructor" << endl;
	}
	Container( string s )
	{
		cout << "Container--stringPara Constructor" << endl;
	}
	Container( int i )
	{
		cout << "Container--intPara Constructor" << endl;
	}

	~Container()
	{
		cout << "Container--Destructor" << endl;
	}

private:

	ElementOne one;
	ElementTwo two;
};

void ObjectModelEx()
{
	Container testContainer;
	Container testContainerString("123");
	Container testContainerInt(0);
}